package 蓝桥真题;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class 卡片 {
       static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
       final static int N=10000010;
       static int a[]=new int[N],idx,n;
       
       public static void main(String[] args) throws NumberFormatException, IOException {
    	      n=Integer.parseInt(br.readLine());
		      while(true){
		    	     a[++idx]=(idx*(1+idx)/2);
		    	     if(a[idx]>=1000000010)break;
		      }
		      for(int i=1;i<=idx;i++){
		    	  if(n<=a[i]){
		    		  System.out.print(i);
		    		  break;
		    	  }
		      }
	}
}
